home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1986 July
/
Ahoy_Magazine_86-07_1986_Double_L.d64
/
disk editor.txt
< prev
next >
Wrap
Text File
|
2022-10-26
|
3KB
|
88 lines
Disk Editor
by Ian MacPhedran
This handy utility edits blocks on a
Commodore disk drive (unit 8, drive
0) from a Commodore 64 computer. I
wrote the program to become more
familiar with the COMAL language, and
I was impressed by the ease of
program flow given by the structured
programming statements. However, I
did note the lack of certain features
in version 0.14. The foremost of
these is the lack of a GET statement
to GET a byte from the disk. However,
the DISK'GET function from
DISK'GET/DEMO on the SAMPLER disk
does fill this need. Also, the STR$
function, while important in many
applications, is not available in
COMAL 0.14, but is easy to program
[Ed note: STR$ and GET$ are built
into COMAL 2.0].
The program displays a menu of 5
options on the screen. Type the
letter next to an option to choose
that portion of the program, as
follows.
Option A: allows you to read a block
from the disk. You will be asked for
the track and sector of the block,
and after reading, the disk status
will be displayed, along with a
request to press a key to return to
the menu. To see the contents of this
block use option C.
Option B: allows you to write an
edited block back to the disk. Be
Careful! Check the block contents
over before writing to make sure that
the changes you have made are the
ones you wanted to make. To be safe,
don't write a block back to disk if
no changes have been made. When
writing, you will again be asked for
track and sector to write to. This
will enable you to write to a block
other than the one read from.
Option C: allows you to look at and
edit half of the block read in with
option A. You will be asked whether
you wish to see the first or second
half of the block (both won't fit on
one screen), and then that portion is
displayed on the screen. The bottom
line asks you either to edit a line
or press return to return to menu. To
edit a line, move the cursor up and
over to the HEX numbers you wish to
change, make the changes required,
and press return. Edit one line at a
time. Note that you should redisplay
the block after editing (i.e., return
to menu and then choose C again) to
check the changes, as the display is
not refreshed after an edit. To
return to the menu press return
without moving the cursor.
Option D: allows you to send commands
to the disk and read the error
channel. This is helpful if you wish
to edit a block, and then allacate it
on the BAM, or if you wish to
VALIDATE or NEW a disk.
Option E: will exit the program and
return you to COMAL.
This program and its variables take
up about half of the available
memory, so small additions can still
be made to it.